php forum
php mysql forum
php mysql smarty
 
Topic Options
#155094 - 10/07/02 11:19 AM [6.3.x] [beta] Do not show edit by
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
It give the admin and the mod the ability to not to show edit by when the edit a post

I am not sour if any body has post this before sorry if they did


This is a small hack all you need is to hack to file

In ubb_edit_post.cgi
Find
Quote:
code:</font><hr />
Code:
$close_option = qq(
<input type="checkbox" id="close_topic" name="close_topic" value="yes" /> <b>$vars_wordlets{close_topic}</b>); 
<hr /></blockquote>replace it by
<blockquote><font class="small">code:
[qb]
Code:
$close_option = qq(
<input type="checkbox" id="close_topic" name="close_topic" value="yes" /> <b>$vars_wordlets{close_topic}</b>

<input type="checkbox" id="show_edit" name="show_edit" value="yes" /> <b>$vars_wordlets_mods{show_edit}</b>); 
[/qb]
search for
Quote:
code:</font><hr />
Code:
	if ($vars_misc{EditWording} eq 'yes') {  
<hr /></blockquote>replace it by
<blockquote><font class="small">code:
[qb]
Code:
        my $is_one = &is_admin_or_mod($in{f}, @user_profile);
        if ($is_one ne "true"){ $in{show_edit}= 'no';}

        if (($vars_misc{EditWording} eq 'yes')&&($in{show_edit}ne 'yes')) {
   
[/qb]
in vars_wordlets_mods.cgi

after
Quote:
code:</font><hr />
Code:
%vars_wordlets_mods = ( 

  
<hr /></blockquote>add
<blockquote><font class="small">code:
[qb]
Code:
    q!show_edit! => q! Do not show edit by!,   
[/qb]
or
Code:
    'show_edit' => 'Do not show edit by',   
depending on your var format

Top
#155095 - 10/07/02 11:22 AM Re: [6.3.x] [beta] Do not show edit by
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Good job! Just a suggestion: maybe in the $in{showedit} ne 'yes' thing add a check to make sure the user is actually a moderator? (a user can edit the edit post file in notepad and add the show_edit checkbox) smile
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155096 - 10/07/02 11:18 PM Re: [6.3.x] [beta] Do not show edit by
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
What is the difference between this hack and the "Ultimate Edit" hack by Zorro?
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#155097 - 10/08/02 12:05 AM Re: [6.3.x] [beta] Do not show edit by
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Here you choose whether you want to hide edit wording or not, Zorro's hack automatically hid it for mods/admins.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155098 - 10/08/02 12:14 PM Re: [6.3.x] [beta] Do not show edit by
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
LK
I have done what you request I hop it is fine now
Thank for your comment and your replay

PrimeTime
I did not knew that Zorro's has post a hack. Any way it is different than what Zorro's has post

Top
#155099 - 10/08/02 12:33 PM Re: [6.3.x] [beta] Do not show edit by
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
You have @user_profile1 there... I think you should add @user_profile1 = &verify_id_num($username, $password, $user_number); before.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#155100 - 10/09/02 11:45 AM Re: [6.3.x] [beta] Do not show edit by
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
Sorry it should be @user_profile I have change it now thanks LK
I don't have to do this I think
&verify_id_num($username, $password, $user_number)

since it is user_profile was declared before
I have test it and it works
The way I test it is by declaring me as a mod in the cp and edit the post. In edit the post I check &#8220;do not show edit by&#8221; before I press post I went to the cp and and rmove me from the mod list. I went to press the post button and it show in the topic that it was edited by &#8230;

Top
#155101 - 10/10/02 03:00 AM Re: [6.3.x] [beta] Do not show edit by
bobbel Offline
Junior Member

Registered: 09/04/02
Posts: 16
Thanks a lot for that nice one smile

bobbel

Top
#155102 - 01/20/03 01:06 PM Re: [6.3.x] [beta] Do not show edit by
The Red Devil Offline
Junior Member

Registered: 05/03/01
Posts: 28
Loc: Norway
What should I change $is_admin_or_mod with to only allow administrators to use this ?

Top
#155103 - 02/06/03 12:06 PM Re: [6.3.x] [beta] Do not show edit by
Joe Siegler Offline
Member

Registered: 03/20/01
Posts: 132
Loc: Garland, TX USA
You don't really need this anymore. The current versions of the code have something built into them which lets you do this by adding a single character.

From ubb_edit_post.cgi:

[code][/code]Just comment out the one line it says to comment out, and admin/mod edits don't get the edited by (unless they're editing their own message, in which case it does show up - but you can turn that off in the control panel, anyway).

Although since this thread is in v6.3 (which is now two versions behind current stuff), I don't think this was in there - I think this was put in 6.4.
_________________________
Joe Siegler
Webmaster - 3D Realms
Moderator - Infopop UBB Support Forums

Join the TiVolution !

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks